Disclaimer: Although Network Info seems to work fine, it is distributed "as is". Use at your own risk. So there.
Network Info is an AppleScript scripting addition (OSAX) that contains three different commands: network information, AppleTalk zones, and AppleTalk entities. To use it, drop it into the Scripting Additions folder located in your Extensions folder or System folder. Please note that the file name has changed so if you have an old version (called "Network Info OSAX"), you will need to remove it by hand. Otherwise, you will get errors when trying to use the new terminology.
• network information will open TCP/IP by default which may have the side effect of dialing the modem for PPP connections. Adding a "without opening TCP" should stop this.
• Setting "opening TCP" to false implicitly sets "resolving IP name" to false.
AppleTalk zones
• The maximum number of zones that will be returned is 256.
• If you don't get all the zones that you know you should, try adjusting the retry interval (how long to wait for responses) and retry count (how many times to request) values.
AppleTalk entities
• You can use the "double-tilde" wildcard character when requesting object names types and entity types. Type option-x on a Mac keyboard to get this character.
• AppleTalk entities will, by default, return a list of Class AppleTalk entities. Adding a "object names only" returns a sorted list of object names. This allows you to do something like:
set LWs to (AppleTalk entities entity type "LaserWriter" with object names only)
choose from list LW
• By default, the address details (network ID, node ID, and socket) for returned entities is not returned to avoid clutter. Add a "with address details" if you really want that info.
• The "matching network ID/node ID/socket" should probably be a whose clause, but that would require more work on my part...
• See notes above regardin retry interval/count values.
• If you get exactly "maximum" responses back, there may be more entities that on the network that aren't in the returned list. Bump up the value and try again.
Release Notes:
1.2 (22-Apr-99)
• Added properties to network info record: OpenTransport present, OpenTransport loaded, OpenTransport version, AppleTalk present, AppleTalk loaded, AppleTalk version, router network ID, router node ID, TCPIP present, TCPIP loaded, TCPIP version, IP address, IP name, and owner name.
• The property "local zone" has been renamed to "AppleTalk zone" and given the property ID 'patz' to match the dictionary in "Network Setup Extension". Likewise, "network number" has been changed to "network ID" and given the property ID 'otin'. "node ID" has been given the property ID 'otio'. network ID and node ID have also been changed to long integers.
• If the local zone is not available, an empty string is returned rather than "<no zone>".
• If computer name is not available, an empty string is returned rather than "<no name>".
• Can now get a list of AppleTalk zones.
• Can now get a list of AppleTalk entities.
• Now returns better (ok, some) error strings when an error occurs.
• Renamed from "Network Info OSAX" to "Network Info".
1.1 (2-Jun-98)
• Fixed terminology conflict with "Jon's Commands" (ethernet address).
• Fixed class IDs so that they are no longer all lowercase (which are reserved by Apple).
• Change some of the property names ("zone" -> "local zone" and "Chooser name" -> "computer name").
1.0.1 (4-Jun-97)
• Now returns the ethernet address when running OpenTransport
1.0 (c. 1996)
• Initial release
If you have any questions, comments, (constructive) criticism, or bug reports let me know. You can contact me at the address(es) below.
-cb
Carl_Bell@baylor.edu
Carl Bell's Web Page <http://www.baylor.edu/~Carl_Bell/>
Stuff I've Written <http://www.baylor.edu/~Carl_Bell/>
Snail Mail:
Carl W. Bell
Information Technology Center
Baylor University
P.O. Box 97268
Waco, TX 76798-7268
Phone:
(254) 710-4065
Baylor's Fine Print:
This software, data and/or documentation contain trade secrets and confidential information which are proprietary to Baylor University. Their use or disclosure in whole or in part without the express written permission of Baylor University is prohibited.
This software, data and/or documentation are also unpublished works protected under the copyright laws of the United States of America. If these works become published, the following notice shall apply:
The name of Baylor University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE, DATA AND/OR DOCUMENTATION ARE PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
When permission has been granted to make copies of this software, data and/or documentation, the above notices must be retained on all copies.
Permission is hereby granted for non-commercial use and distribution of Network Info OSAX.